package com.jt.enum1;

import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * 枚举，代码和对应值
 * 性别枚举
 * auther: MLR.gf
 * date: 2022/11/2
 */
public enum SexEnum implements IEnum<Integer> {
    MAN(1,"男"),
    WOMAN(2,"女");
    private Integer code;
    private String name;

    SexEnum(Integer code,String name){
        this.code=code;
        this.name=name;
    }

    @Override
    public Integer getValue() {
        return code;
    }

    public String getName() {
        return name;
    }
}
